<?php


namespace app\xiangji\validates;


use think\Validate;

class DummyJottingValidate extends Validate
{
    protected $rule = [
        'content'   => 'require|max:500',
        'score|分值'     => 'require|integer|min:-10|max:10',
        'page|页码'      => 'require|integer|min:1',
        'limit|每页条数'     => 'require|integer|min:1',
    ];

    protected $message = [
        'content.require'   => '随笔内容不能为空',
        'content.max'       => '随笔内容太大'
    ];

    protected $scene = [
        'create'    => ['content', 'score'],
        'fetch'     => ['page', 'limit']
    ];
}
